Extract attribute definitions in a project

Does anyone have a dxl to extract the attribute definitions for all modules in a project? We need to consolidate our definitions to make them more consistent but first we have to know what everyone has been using.
SystemAdmin - Thu Jul 12 09:11:09 EDT 2012

Re: Extract attribute definitions in a project
mcnairk - Thu Jul 12 09:37:40 EDT 2012

Assuming you mean OBJECT rather than MODULE attributes, the following will display them for the current module. You just need to loop thru all modules, and copy/paste or stream the output to an Excel file:
 

print "Type Name\tBase Type\tValues\n";
AttrType at;
for at in current Module do {
int i;
print (at.name)"\t"(at.type)"";
if (at.type"" == "Enumeration") {
for ( i = 0; i < at.size; i++){
print "\t"at.strings[i];
}
}
print "\n"
}

 


Ken.

 

Re: Extract attribute definitions in a project
SystemAdmin - Thu Jul 12 10:44:56 EDT 2012

mcnairk - Thu Jul 12 09:37:40 EDT 2012

Assuming you mean OBJECT rather than MODULE attributes, the following will display them for the current module. You just need to loop thru all modules, and copy/paste or stream the output to an Excel file:
 

print "Type Name\tBase Type\tValues\n";
AttrType at;
for at in current Module do {
int i;
print (at.name)"\t"(at.type)"";
if (at.type"" == "Enumeration") {
for ( i = 0; i < at.size; i++){
print "\t"at.strings[i];
}
}
print "\n"
}

 


Ken.

 

Thank you for the dxl. I am not a programmer and I do understand what loop through means but do you have an example of how to do that?

I really appreciate your help.

Re: Extract attribute definitions in a project
mcnairk - Thu Jul 12 10:59:38 EDT 2012

SystemAdmin - Thu Jul 12 10:44:56 EDT 2012
Thank you for the dxl. I am not a programmer and I do understand what loop through means but do you have an example of how to do that?

I really appreciate your help.

Sorry, no time to do this for you. Instead, I suggest you use the attached DXL, which can be used to run this (or any other DXL) on selected modules.
Attachments

attachment_14855786_runAll2.dxl

Re: Extract attribute definitions in a project
SystemAdmin - Thu Jul 12 11:29:20 EDT 2012

For one (current) module you can use the documentModuleAtrribsView20.dxl script from the page http://beaver-consulting.awardspace.com/DoorsDXL.htm

  • Pekka Mäkinen - http://www.softqa.eu/

Re: Extract attribute definitions in a project
SystemAdmin - Thu Jul 12 12:49:11 EDT 2012

mcnairk - Thu Jul 12 10:59:38 EDT 2012
Sorry, no time to do this for you. Instead, I suggest you use the attached DXL, which can be used to run this (or any other DXL) on selected modules.

Thank you - you have been very helpful